<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="../../css/demo.css" rel="stylesheet" type="text/css" />
<script src="../../js/boot.js" type="text/javascript"></script>
<script src="../../js/mini_common.js" type="text/javascript"></script>
<script src="../../js/activity/activity.js" type="text/javascript"></script>
</head>
<body>
	<h1>活动管理</h1>
	<div style="width:100%">
        <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
            <table style="width:100%;">
                <tr>
                    <td style="width:100%;">
                        <a class="mini-button" iconCls="icon-add" onclick="addNewActivity()">添加</a>
                    </td>
                </tr>
            </table>           
        </div>
    </div>
	<div id="datagrid1" class="mini-datagrid" onshowrowdetail="onShowRowDetail" url="javascript:getRootPath()+'/rest/activity/list'" style="width: 100%;" idField="id" allowResize="true" sizeList="[20,50,100]" pageSize="20">
		<div property="columns">
			<div field="activityId" visible="false"></div>
			<div type="expandcolumn" >#</div>
			<div field="activityName"   headerAlign="center" allowSort="true">活动名称</div>
			<div field="activityBeginTime" dateformat="yyyy-MM-dd HH:mm:ss"  headerAlign="center"  allowSort="true" >活动开始时间</div>
			<div field="activityEndTime" headerAlign="center" dateformat="yyyy-MM-dd HH:mm:ss" allowSort="true">活动结束时间</div>
			<div field="activityContent"  visible="false"></div>
			<div field="activityPrice"  headerAlign="center" allowSort="true">活动价格</div>
			<div field="discount"  headerAlign="center" allowSort="true">最终折扣</div>
			<div field="createTime" headerAlign="center" allowSort="true" dateformat="yyyy-MM-dd HH:mm:ss">新增时间</div>
			<div field="createUser"   headerAlign="center" allowSort="true">操作人</div>
			<div field="updateTime"  headerAlign="center"  allowSort="true" dateformat="yyyy-MM-dd HH:mm:ss">更新时间</div>
			<div field="updateUser" headerAlign="center"  allowSort="true">更新人</div>
			<div field="disabledState"  headerAlign="center" allowSort="true"  renderer ="onDataStatus">是否删除</div>
			<div name="action" headerAlign="center" align="center" renderer="onActionRenderer" cellStyle="padding:0;">操作</div>
		</div>
	</div>
	<div id="detailGrid_Form" style="display:none;">
		<div style="width:100%">
    </div>
	<div id="activityed_user" class="mini-datagrid"  showEmptyText="true" emptyText="本活动没有属性数据" style="width:100%;height:300px;" url="javascript:getRootPath()+'/rest/activity/list_from_record'">
            <div property="columns">
            	<div field="openId" visible="false"></div>
            	<div field="activityId"  headerAlign="center" allowSort="true">活动编码</div>
            	<div field="userNickName" width="120" headerAlign="center" allowSort="true">用户昵称</div>
            	<div field="join_time"  headerAlign="center"  allowSort="true" dateformat="yyyy-MM-dd HH:mm:ss">参加活动时间</div>
                <div field="money" width="120" headerAlign="center" allowSort="true">支付金额</div>                
                <div field="order_num" width="100" allowSort="true" align="center" headerAlign="center">支付订单号 </div>            
        </div> 
	<div class="description">
		<h3>蓝鲸科技，科技引领潮流。</h3>
	</div>
	<script>
		mini.parse();
		var TuserID = getCookie("TuserID");
		var activityed_user_grid = mini.get("activityed_user");
		var detailGrid_Form = document.getElementById("detailGrid_Form");
		if(TuserID == null || TuserID ==""){
			alert("您尚未登录，请登录。");
			window.location.href= getRootPath()+"../../pages/access/admin_login.html";
		}else{
			var grid = mini.get("datagrid1");
			var parms = {"userId":TuserID};
	        grid.load(parms);
		}
	</script>
</body>
</html>